import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Test {

    public Test() {
        EnigmaCoder coder = new EnigmaCoder(0,0,0);
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); //ctr + shift + o

        try {
            System.out.println("请输入需要加密的字符串:");
            String str = in.readLine();
            System.out.println("加密前为:"+str);
            str = coder.encode(str);
            System.out.println("加密后为:'"+str+"'");

            coder.setCoder(0, 0, 0);
            System.out.println("请输入需要解密的字符串:");
            str = in.readLine();
            str = coder.encode(str);
            System.out.println("解密后为:'"+str+"'");
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }

    public static void main(String[] args) {
        Test ts = new Test();

    }

}